package io.renren.modules.erp.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.erp.dao.PaperInfoDao;
import io.renren.modules.erp.entity.PaperInfoAndType;
import io.renren.modules.erp.entity.PaperInfoEntity;
import io.renren.modules.erp.service.PaperInfoService;


@Service("paperInfoService")
public class PaperInfoServiceImpl extends ServiceImpl<PaperInfoDao, PaperInfoEntity> implements PaperInfoService {
	
	@Autowired
	private PaperInfoDao paperInfoDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<PaperInfoEntity> page = this.selectPage(
                new Query<PaperInfoEntity>(params).getPage(),
                new EntityWrapper<PaperInfoEntity>()
        );

        return new PageUtils(page);
    }

	@Override
	public List<PaperInfoAndType> queryAllList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		List<PaperInfoAndType> res= paperInfoDao.queryAllList(params);
		return res;
	}

}
